import { Effect, ImmerReducer, Reducer, Subscription } from 'umi';


export interface DialogModelType {
    namespace: 'dialog';
    state: boolean;
    reducers: {
        // save: Reducer<IndexModelState>;
        // 启用 immer 之后
        changeFlag: ImmerReducer<boolean>;
    };
}

const DialogModel: DialogModelType = {
    namespace: 'dialog',
    state: false,
    reducers: {
        changeFlag(state, action) {
            state = action.flag
            return state
        }
    }
};

export default DialogModel;